<div class="page-content" >
	<div class="panel panel-default">
		<div class="panel-heading"> <strong>视频列表</strong> </div>
		<div class="panel-body">
			<div id="toolbar" style="width: 100%;">
				<form id="filter" method="get" action="<{:addons_url('video')}>" class="form-horizontal">
					<div class="form-group">
						<div class="col-sm-6">
							<input class="input-small datetimepicker" data-date="" data-date-format="yyyy-mm-dd" type="text" name="stime" size="10" id="stime" value="<{$stime}>" autocomplete="off">
						-
						<input class="input-small datetimepicker" data-date="" data-date-format="yyyy-mm-dd" size="10" type="text" name="etime" id="etime" value="<{$etime}>" autocomplete="off">
						</div>
						<if condition="$type eq ''">
						<div class="col-sm-3">
							 <input class="input-small" name="title" placeholder="标题"  size="15" type="text" value="<{$title}>" autocomplete="off">
						</div>
						</if>
						<div class="col-sm-3" style="float:right; width:auto">
						
							<input type="submit" class="btn btn-primary pull-right" value="筛选">
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-8"> <a data-type="link" target="blank"  href="<{:addons_url('add_video')}>" class="btn btn-default"> <i class="fa fa-plus"></i> 添加 </a>  
						 
						</div>
					</div>
				</form>
			</div>
			<div class="bootstrap-table">
				<div class="fixed-table-container" style="padding-bottom: 0px;">
					<div class="fixed-table-body">
						<table id="data-table" class="table">
							<thead>
								<tr>
								<th style="" data-field="name"><div class="th-inner ">id</div>
										<div class="fht-cell"></div></th>
									 
									<th style="" data-field="name"><div class="th-inner ">标题</div>
										<div class="fht-cell"></div></th>

									<th style="" data-field="name"><div class="th-inner ">视频</div>
										<div class="fht-cell"></div></th>	
									 
									<th style="" data-field="name"><div class="th-inner ">上传时间</div>
										<div class="fht-cell"></div></th>
									 
									<th style="" data-field="id"><div class="th-inner ">操作</div>
										<div class="fht-cell"></div></th>
								</tr>
							</thead>
							<tbody>
								<volist name="data" id="vo">
									<tr data-index="0">
										 <td>
										 	<input type="radio"   name="ids[]" style="margin:0px"   autocomplete="off" value="<{$vo.url}>">
											<textarea name="video_info" style="display:none"><{$vo.video_info}></textarea>
										 </td>
										<td height="36"   valign="middle"><{$vo.title}></td>

										<td height="36"   valign="middle">
										<a target="blank" href="<{$vo.url}>">
										<img  onclick="_open_video(this);return false;" url="<{$vo.m3u8_720}>"   title="播放" height="50" src="<{$vo.thumbnail}>">
										</a>
										</td>

										<td height="36"   valign="middle"><{$vo['uptime']}></td>
										 
										<td style="">
										<input type="hidden" id="video_<{$vo['id']}>" value='<iframe src="<php>echo HomeUrl</php>/BoxAddon/Upload/Index/videoPlay?url=<{$vo["m3u8_720"]}>&image=<{$vo.thumbnail}>" frameborder="0" allowfullscreen="true" width="100%" height="100%"></iframe>'>
										<a data-type="copy" data-clipboard-target="video_<{$vo['id']}>"  class="btn btn-primary btn-xs">复制视频地址</a> </td>
									</tr>
								</volist>
							</tbody>
						</table>
					</div>
					<include file="./Apps/BoxAdmin/View/Ace/Public/pager.html" /> </div>
			</div>
			 <div class="col-sm-12" align="center"> 
<a  class="btn btn-default" onclick="select_video(this)"> 确认 </a>
                   
                    </div>
			<div class="clearfix"></div>
		</div>
	</div>


	    <!--视频播放窗口-->
 

<div class="modal fade" id="modal_video" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">视频播放</h4>
      </div>
      <div class="modal-body">
	  <div id="videoPlayer"></div>
      </div>
       
    </div>
  </div>
</div>


<script type="text/javascript" charset="utf-8" src="http://cdn.aodianyun.com/lss/ckplayer/player.js"></script> 
<script>

function select_video(_this){
$(_this).parents(".modal").modal("hide");
var url=$("[name='ids[]']:checked").val();
$(document).trigger("videoSelect", [url]);
}


function _open_video(obj){
	var url=$(obj).attr("url");//视频地址
	var image=$(obj).attr("src");//封面图片
	 var w = "560";//视频宽度
	  var h = "368";//视频高度
	  var flashvars={f:'http://cdn.aodianyun.com/lss/ckplayer/m3u8.swf',a:url,c:0,s:4,i:image,lv:0};
	  var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
	  var video=[url];
	  CKobject.embed('http://cdn.aodianyun.com/lss/ckplayer/ckplayer.swf','videoPlayer','ckplayerFlashBox',w,h,false,flashvars,video,params);
	  
	  $("#modal_video").modal("show");
}

 
</script> 

</div>
 
 


 
 
